package com.atguigu.gmall.publisher.service.impl;


import com.atguigu.gmall.publisher.beans.TradeProvinceOrderAmount;
import com.atguigu.gmall.publisher.mapper.TradeStatesMapper;
import com.atguigu.gmall.publisher.service.TradeStateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class TradeStatsServiceImpl implements TradeStateService {

    @Autowired
    private TradeStatesMapper tradeStatesMapper;

    @Override
    public BigDecimal getGMV(Integer date) {
        return tradeStatesMapper.selectGMV(date);
    }

    @Override
    public List<TradeProvinceOrderAmount> getProvinceAmount(Integer date) {
        return tradeStatesMapper.selectProvinceAmount(date);
    }
}
